/**
 * 页面初始化完成回调
 */
myApp_.onPageInit('seller_order_detail', function (page) {
    //请求数据
    SELLER_ORDER_DETAIL.request();
});


/**
 * LIST 对象 
 */
SELLER_ORDER_DETAIL = {}
SELLER_ORDER_DETAIL.oid = '';

//页面数据
SELLER_ORDER_DETAIL.data = {};


SELLER_ORDER_DETAIL.__INIT__ = function(oid){
    SELLER_ORDER_DETAIL.oid = oid;
    mainView.router.load({
        url: "src/seller/order/detail.html"
    });
}

SELLER_ORDER_DETAIL.request = function(){
	request_(
		url_('addons/execute/seller-App-order_info')
		,{
			order_id: SELLER_ORDER_DETAIL.oid
		}
		,function(d){
			if (d.code == 0) {
				SELLER_ORDER_DETAIL.data = d.data;
				SELLER_ORDER_DETAIL.fill();
            } else {
                my_tips_(d.msg);
            }
		}
	);
}

SELLER_ORDER_DETAIL.fill = function(){
	$.tpl({
		url: 'src/seller/order/detail_tpl.html'
		,context: SELLER_ORDER_DETAIL.data
		,elem: '#seller_order_detail_content'
	});
}
